package com.hanyizhu.demostore.controller;

import com.hanyizhu.demostore.entity.OrderItem;
import com.hanyizhu.demostore.service.IOrderItemService;
import com.hanyizhu.demostore.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.ParameterResolutionDelegate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/orderlies")
public class OrderItemContllor extends BaseController{
    @Autowired
    private IOrderItemService orderItemService;
    @RequestMapping("{oid}")
    public JsonResult<List<OrderItem>> getfindByOid(Integer oid){
        List<OrderItem> data = orderItemService.getByOid(oid);
        return new JsonResult<>(OK,data);
    }
}
